#include<iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <set>
#include <map>
using namespace std;
class Solution {
public:
    void rotate(vector<vector<int>>& matrix) {
        int n = matrix.size();
        for (int i = 0; i < (n + 1) / 2; i++)
        {
            for (int j = 0; j < n / 2; j++)
            {
                int t = matrix[i][j];
                int x = i, y = j;
                int xf, yf;
                for (int k = 0; k < 3; k++)
                {
                    xf = n - 1 - y;
                    yf = x;
                    matrix[x][y]= matrix[xf][yf];
                    x = xf, y = yf;
                }
                matrix[x][y] = t;

            }
        }
    }
};
int main()
{
    Solution s;

}